(Mask R-CNN) AssertionError when I run inspect_model.py in run_graph()

BUG:

inspect_model.ipynb###1.b RPN Prediction部分,run_graph()报错``AssertionError`

\# Run RPN sub-graph

pillar = model.keras_model.get_layer("ROI").output # node to start searching from

rpn = model.run_graph([image], [

  ("rpn_class", model.keras_model.get_layer("rpn_class").output),

  ("pre_nms_anchors", model.ancestor(pillar, "ROI/pre_nms_anchors:0")),

  ("refined_anchors", model.ancestor(pillar, "ROI/refined_anchors:0")),

  ("refined_anchors_clipped", model.ancestor(pillar, "ROI/refined_anchors_clipped:0")),

  ("post_nms_anchor_ix", model.ancestor(pillar, "ROI/rpn_non_max_suppression:0")),

  ("proposals", model.keras_model.get_layer("ROI").output),

])

====>


AssertionError      Traceback (most recent call last)

<ipython-input-14-799ca4676404> in <module>()

   7   ("refined_anchors_clipped", model.ancestor(pillar, "ROI/refined_anchors_clipped:0")),

   8   ("post_nms_anchor_ix", model.ancestor(pillar, "ROI/rpn_non_max_suppression:0")),

----> 9   ("proposals", model.keras_model.get_layer("ROI").output),

   10 ])



/home/orestisz/repositories/Mask_RCNN/model.py in run_graph(self, images, outputs)

  2296     for o in outputs.values():

  2297       print(o)

-> 2298       assert o is not None

  2299 

  2300     # Build a Keras function to run parts of the computation graph



AssertionError:

解决:

TensorFlow 1.4引入了一个新版本的NMS(No-max-suppression)操作,并使用了一个新名称。

学会在github上找issue:run_graph AssertionError